package com.example.demo1.service.impl;

import com.example.demo1.dao.StudentDao;
import com.example.demo1.dao.impl.StudentDaoImpl;
import com.example.demo1.entity.Student;
import com.example.demo1.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentDao studentDao = new StudentDaoImpl() ;
    @Override
    public Boolean addStudent(Student student) throws Exception {
        return studentDao.addStudent(student);
    }

    @Override
    public Student getStudentById(Integer id) throws Exception {
        return studentDao.getStudentById(id);
    }

    @Override
    public List<Student> getAll() {
        return studentDao.getAll();
    }
}
